<admintpl file="header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('Ads/lists')}" target="_self">广告列表</a></li>
        <!--<li><a href="{:U('About/docadd')}" target="_self">新增Doc类型</a></li>-->
        <li class="active"><a href="javascript:;">编辑</a></li>
    </ul>
    <form action="{:U('Ads/edit_post')}" method="post" class="form-horizontal"
          enctype="multipart/form-data">
        <div class="row-fluid">
            <div class="span9">
                <input type="text" style="display: none;"  name="ad_id" required value="{$info.ad_id}" />

                <table class="table table-bordered">
                    <tr>
                        <th width="80">名称</th>
                        <td>
                            <input type="text" style="width:400px;" disabled  required value="{$info.ad_name}" />
                            <input type="text" style="display: none;"  name="ad_name" required value="{$info.ad_name}"
                                   placeholder="请输入名称"/>
                            <span class="form-required">*</span>
                        </td>
                    </tr>
                    <tr style="display: none;">
                        <th width="80">KEY</th>
                        <td>
                            <input type="text" style="width:400px;" name="type" required value="{$info.type}"
                                   placeholder="请输入KEY"/>
                            <span class="form-required">仅配置为KEY说明中的访问有效*</span>
                            <div style="margin: 6px;">
                                <div>
                                    <strong>KEY说明:</strong>
                                </div>
                                <table style="width: 100%" class="table table-bordered">
                                    {$doclist}
                                </table>
                            </div>
                        </td>
                    </tr>

                    <tr>
                <th>内容</th>
                <td>
                    <script type="text/plain" id="ad_content" name="ad_content"
                            style="width:80%x;height:500px;">{$info.ad_content}
                    </script>
                    </td>
                    </tr>
                    </table>
                    </div>
                    </div>
                    <div class="hidden">

        </div>
        <div class="form-actions">
        <button class="btn btn-primary js-ajax-submit" type="submit">修改</button>
        <a class="btn" href="{:U('Ads/lists')}">返回</a>
        </div>
        </form>
        </div>
        <script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/ueditor/ueditor.all.min.js"></script>
    <script type="text/javascript">
        $(function () {
            /////---------------------
            <!-- 实例化编辑器 -->
            var ue = UE.getEditor('ad_content', {
                autoHeight: false,
                autoHeightEnabled: true, //出现滚动条
                elementPathEnabled: false  //去掉元素路径

            });
            /*ue.ready(function () {
                //设置编辑器的内容
                ue.setContent('{$info.ad_content}');
                //获取html内容，返回: <p>hello</p>d
            });*/

        });
    </script>
</body>
</html>